package com.one.consumer.order.model;

import com.one.common.model.bean.PayWXBean;
import com.one.common.model.http.base.BaseResponse;
import com.one.consumer.main.model.item.OrderItem;
import com.one.consumer.order.model.item.OrderDetailItem;
import com.one.consumer.reserve.model.item.CustomItem;
import com.one.consumer.reserve.model.item.ReserveItem;
import com.one.consumer.user.model.item.InvoiceItem;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/10/21 下午4:56
 * description ：
 **/
public interface OrderApi {

    /**
     * 订单列表
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailOrders")
    Observable<BaseResponse<ArrayList<OrderItem>>> getOrderList(@FieldMap Map<String , String> params);

    /**
     * 定制加配----订单列表
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizedOrders")
    Observable<BaseResponse<ArrayList<CustomItem>>> customList(@FieldMap Map<String, String> params);

    /**
     * 预约订单列表
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getRenovationOrders")
    Observable<BaseResponse<ArrayList<ReserveItem>>> reserveList(@FieldMap Map<String, String> params);

    /**
     * 预约，装修获取支付凭证
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/payRenovationOrder")
    Observable<BaseResponse<PayWXBean>> getPayConfigDE(@FieldMap Map<String, String> params);

    /**
     * 定制加配获取支付凭证
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/payCustomizedOrder")
    Observable<BaseResponse<PayWXBean>> getPayConfigCustom(@FieldMap Map<String, String> params);



    /**
     * 取消订单
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/cancelMaintailOrder")
    Observable<BaseResponse<Object>> cancelOrder(@FieldMap Map<String, String> params);

    /**
     * 立即确认
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/acceptMaintailOrder")
    Observable<BaseResponse<Object>> confirmOrder(@FieldMap Map<String, String> params);

    /**
     * 支付订单
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/payMaintailOrder")
    Observable<BaseResponse<PayWXBean>> payOrder(@FieldMap Map<String, String> params);

    /**
     * 评价订单
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/insertMaintailOrderAssessment")
    Observable<BaseResponse<Object>> evaluateOrder(@FieldMap Map<String, String> params);

    /**
     * 删除订单
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/deleteMaintailOrder")
    Observable<BaseResponse<Object>> deleteOrder(@FieldMap Map<String, String> params);

    /**
     * 申请发票
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/insertMaintailOrderInvoice")
    Observable<BaseResponse<Object>> applyInvoice(@FieldMap Map<String, String> params);

    /**
     * 发票----发票详情
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailOrderInvoiceDetail")
    Observable<BaseResponse<InvoiceItem>> invoiceDetail(@FieldMap Map<String, String> params);

    /**
     * 发票----发票记录
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailOrderInvoices")
    Observable<BaseResponse<ArrayList<InvoiceItem>>> invoiceList(@FieldMap Map<String, String> params);

    /**
     * 报修订单----订单详情
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailOrderDetail")
    Observable<BaseResponse<OrderDetailItem>> orderDetail(@FieldMap Map<String, String> params);


}
